<!DOCTYPE html>
<html lang="zh-cn">
	<head>
		<meta charset="UTF-8" />
		<title>登录</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-touch-fullscreen" content="yes">
		<meta http-equiv="Access-Control-Allow-Origin" content="*">
		<link rel="stylesheet" href="/qstatic/css/reset.css" />
		<link rel="stylesheet" href="/qstatic/css/animate.css" />
		<link rel="stylesheet" href="/qstatic/css/layout.css" />

		<script src="/qstatic/js/jquery-1.9.1.min.js"></script>
		<script src="/qstatic/js/zepto.min.js"></script>
		<script src="/qstatic/js/fontSize.js"></script>
		<script src="/qstatic/js/wcPop/wcPop.js"></script>

		<script src="/qstatic/js/layui.js"></script>
		<style type="text/css">
			a#J__btnreg {
			        background-color: #3caf55;
			        }
		</style>

	</head>

	<body>

		<!-- <>微聊主容器 -->
		<div class="wechat__panel clearfix">
			<div class="wc__home-wrapper flexbox flex__direction-column">
				<!-- //登录页面 -->
				<div class="wc__lgregPanel flex1">
					<h2 class="hdtips">账号登录

						{if sysconfig('game','gamelogin') != '0'}
						<font style="font-size: 2vh;color: #999;margin: 0px 0px 0px 10px;">微聊账号和游戏同步,无需重复注册</font>
						{/if}
					</h2>
					<div class="forms">
						<form action="login" method="post" id="loginForm" autocomplete="on">
							<ul class="clearfix">
								<li>
									<label class="lbl flexbox">
										<em>账号</em>
										<input class="iptxt flex1" type="text" name="account" placeholder="请填写登陆账号" />
									</label>
								</li>
								<li>
									<label class="lbl flexbox">
										<em>密码</em>
										<input class="iptxt flex1" type="password" name="password" placeholder="请填写密码" />
									</label>
								</li>
							
							</ul>
							<!--<div class="lgway"><a>找回密码</a></div>-->
							<div class="btns">
								<a class="wc__btn-primary btn__login" id="J__btnLogin" onclick="submit()" href="javascript:;">登录</a>
								<br>
								<a class="wc__btn-primary btn__reg" id="J__btnreg" href="reg">注册</a>
							</div>
						</form>
					</div>
				</div>
				<!-- //底部 -->
				<div class="wc__lgregFoot">
					<ul class="clearfix">
						<li>
							<a href="#">找回未开发</a>
						</li>
						<!--<li><a href="#"></a></li>-->
					</ul>
				</div>
			</div>
		</div>

		<script type="text/javascript">
			    function submit(){
			        $.post("/login/login", {
                        account: $('input[name="account"]').val(),  
                        password: $('input[name="password"]').val() 
                    }, function(data, status) {
                        if(data.code != 1){
                            layer.msg(data.msg, {icon: 0}, function(){
                                // layer.msg('提示框关闭后的回调');
                            });
                        }else{
                            layer.msg(data.msg, {icon: 0,time:1000}, function(){
                                window.location.href = data.url;
                            });
                        }

                    });
			    }
		</script>

	</body>
</html>